#作业7  计算杨辉三角前6行
list0 = [1]
list1 = [1,1]
print(list0[0])
print(list1[0],list1[1])
for i in range(2,7):
    numlist = [1]
    for j in range(1,i+1):
        if j == i:
            x = list1[j - 1]
        else:
             x = list1[j - 1] + list1[j]
        numlist.append(x)
    for a in numlist:
        print(a,end = ' ')
    print()
    list1 = numlist
